package com.sunbird.crm.contorller;

import com.sunbird.crm.base.Vo.RestMessage;
import com.sunbird.crm.base.aspect.AopLog;
import com.sunbird.crm.base.contorller.BaseContorller;
import com.sunbird.crm.entity.sys.TMeun;
import com.sunbird.crm.servce.SysMeunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName MeunConterllor
 * @Descriptiom TODO 菜单权限类
 * @Author Sunbird
 * @Date 2019/9/4 22:33
 * @Version 1.0
 **/
@RestController
@RequestMapping("meun")
public class MeunConterllor extends BaseContorller {

    @Autowired
    private SysMeunService meunService;

    @AopLog("新增菜单权限")
    @RequestMapping("save")
    public RestMessage save(TMeun meun){
        return meunService.save(meun);
    }

    @AopLog("查询菜单权限")
    @RequestMapping("find")
    public RestMessage find(TMeun meun){
        return meunService.find(meun.getMenuCode());
    }

}
